#!/usr/bin/env python
# -*- coding: UTF-8 -*-

from scripts.http_server_node import Http_Server_Node
import time

if __name__ == "__main__":
    failed_count = 0
    while True:  
        try:
            node_name = "Normal_Server_Node"
            node = Http_Server_Node(node_name, 8886)
            config = node.GetDefaultBlueprintConfig()
            node.StartRunning(config)
            
        except Exception as error:
            failed_count += 1
            print("[{}]Failed count: {}, Node error: {}".format(node_name, failed_count, error))
            
            ##等待错误上传实现后，添加报错

            time.sleep(10)  #等待10s

